package main

import (
	"errors"
	"fmt"
	"gopl/ch2/popcount"
	"log"
	"os"
)

var cwd string

func init() {
	var err error
	cwd, err = os.Getwd()
	if err != nil {
		log.Fatalf("os.Getwd failed: %v", err)
	}
	log.Printf("Woking directory = %s", cwd)
}
func main() {
	fmt.Printf("%v ", popcount.PopCount1(128))
	fmt.Printf("%v ", popcount.PopCount2(126))
	fmt.Printf("%v ", popcount.PopCount3(126))
	err := errors.New("error ll")
	if err != nil {
		str := fmt.Errorf("error is %w", err)
		fmt.Println(str)
	}
	var f float32 = 1 << 23
	fmt.Println(f, f == f+1)
	fmt.Println(cwd)
}
